package pl.put.augrelshooter.logic.detection.opencv.color;

import org.opencv.core.Scalar;

public class ColorDescriptionFactory {

	private static final Scalar GREEN_HSV = new Scalar(85, 200, 200);
	private static final Scalar GREEN_HSV_RADIUS = new Scalar(20, 140, 140);
	private static final Scalar RED_HSV = new Scalar(10, 210, 210);
	private static final Scalar RED_HSV_RADIUS = new Scalar(7, 80, 80);
	private static final Scalar YELLOW_HSV = new Scalar(40, 220, 220);
	private static final Scalar YELLOW_HSV_RADIUS = new Scalar(10, 40, 40);
	private static final Scalar BLUE_HSV = new Scalar(160, 210, 210);
	private static final Scalar BLUE_HSV_RADIUS = new Scalar(20, 140, 140);

	public static ColorDescription obtainDescriptionFor(ColorDescriptionsEnum color) {
		switch (color) {
		case GREEN:
			return new ColorDescription(GREEN_HSV, GREEN_HSV_RADIUS);
		case RED:
			return new ColorDescription(RED_HSV, RED_HSV_RADIUS);
		case YELLOW:
			return new ColorDescription(YELLOW_HSV, YELLOW_HSV_RADIUS);
		case BLUE:
			return new ColorDescription(BLUE_HSV, BLUE_HSV_RADIUS);
		default:
			return new ColorDescription(new Scalar(0), new Scalar(0));
		}
	}
}